<template>
  <div class="adivice-info" style="padding-left:5px;box-sizing:border-box;">
    <div class="search-content">
      <Col class="panel search-panel" :span="24" style="padding:12px;">
      <Button type="primary" icon="md-arrow-back" @click="backToCompany">返回上一页</Button>
      <Breadcrumb style="display:inline-block;line-height: 36px;margin-left: 15px;">
        <BreadcrumbItem to="/video">热成像监控</BreadcrumbItem>
        <BreadcrumbItem to="/video/device">设备管理</BreadcrumbItem>
        <BreadcrumbItem>视频图像</BreadcrumbItem>
      </Breadcrumb>
      </Col>
    </div>
    <Col class="panel tab-panel adevice-tab-panel" style="height:calc(100% - 65px);" :span="24">
    <div style="height:100%;width:100%;padding:20px;box-sizing:border-box;">
      <!-- <Player :url="videoSource" /> -->
      <!-- <div class="w1 h1" id="video-player"></div> -->
      <RealTime :type="2"></RealTime>
    </div>
    </Col>
  </div>
</template>
<script>
import { getVideoParams } from "@/api"
// import Player from "../../Player"
import RealTime from "@/view/video/device/videoDistribute/components/realTime"
export default {
  components: { RealTime },
  // mounted() {
  //   this.initVideoPlayer()
  // },
  // data() {
  //   return {
  //     videoSource: null
  //   }
  // },
  methods: {
    backToCompany() {
      this.$router.push("/video/device")
    }
    // initVideoPlayer() {
    //   const id = this.$route.params.id
    //   getVideoParams({ id }).then(res => {
    //     if (res.code === 200) {
    //       // 视频播放地址
    //       const { videoNvrStream } = res.data.base
    //       this.videoSource = videoNvrStream
    //       console.log("当前视频播放地址：" + videoNvrStream)
    //       this.playerOnPlay()
    //     }
    //   })
    // },
    // playerOnPlay() {
    //   this.$nextTick(() => {
    //     const videoObject = {
    //       container: "#video-player",
    //       autoplay: true, // 自动播放
    //       live: true, // 直播
    //       variable: "player",
    //       flashplayer: false,
    //       logo: null,
    //       video: this.videoSource
    //     }
    //     var player = new ckplayer(videoObject)
    //   })
    // }
  }
}
</script>
